import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '@/layout'

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('@/views/home/index.vue')
      },
      {
        path: 'login',
        name: 'login',
        component: () => import('@/views/login/index.vue')
      },
      {
        path: 'editor',
        name: 'editor',
        component: () => import('@/views/editor/index.vue')
      }
    ]
  }
]

// new VueRouter
const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
